$(document).ready(
    function() {
        $("#inputForm")
            .validate(
            {
                submitHandler : function(form) {
                    form.submit();
                },

                rules:{
                    mobile:{
                        ismobile:true
                    },
                    rePassword:{
                        equalTo:'#password'
                    }
                },

                errorElement:'div',
                messages: {

                },
                errorPlacement : function(error, element) {
                    $(element).parent().next().remove();
                    if (element.is(":checkbox")
                        || element.is(":radio")
                        || element.parent().is(
                            ".input-append")) {
                        error.appendTo(element.parent()
                            .parent());
                        $("<label class='wrong fa fa-times' style='margin-left: 5px;line-height: 34px'></label>").insertAfter(element.parent().parent().parent());
                    } else {
                        error.insertAfter(element);
                        $("<label class='wrong fa fa-times' style='margin-left: 5px;line-height: 34px'></label>").insertAfter(element.parent());
                    }
                },
                success: function(element) {
                    $(element).parent().next().removeClass('wrong fa fa-times');
                    $(element).parent().next().addClass('right fa fa-check');
                    $(element).remove();
                },
            });
    });

